Repository navigation
Conversation
| $items = iterator_to_array($this->cache->get($url, $token, $offset, $count), false); | ||
| if (in_array(null, $items, true)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
This loads all items in memory instead of streaming using the generator.
Can you explain better what you are trying to fix?
When is null yielded by the cache?
There was a problem hiding this comment.
The null comes from PaginateCache::get() when the count key is still there but one of the row entries was evicted (typical with APCu as the only cache, see #62538), so writeRaw(null) throws and the request 500s. It streams from the generator again now and just stops at the first missing entry, then falls back to the normal response.
Assisted-by: Claude:claude-opus-5-5 Signed-off-by: lazerg <lazerg2@gmail.com>
793b0fa to
92066ee
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
When the pagination cache loses individual entries but keeps the count key,
PaginatePlugin::onMethod()passednulltoXMLWriter::writeRaw()and the request failed with a 500. The loop now stops at the first missing entry, and the request is handled like one without a pagination token.AI disclosure: this change was prepared with Claude (claude-opus-5-5) and reviewed by me.
Fixes #65080